home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
windows
/
games
/
tricho.exe
/
TRICHO.DOC
< prev
next >
Wrap
Text File
|
1990-03-16
|
1KB
|
26 lines
This is a Microsoft Windows program which generates a fractal pattern
inside a triangle. It demonstrates how a regular pattern can sometimes
result from an apparently chaotic or random process. I saw this demonstrated
on the P.B.S television NOVA program entitled "THE STRANGE NEW SCIENCE OF
CHAOS" shown 1-31-89.
The algorithm is roughly...
1. plot 3 points for the vertices of a triangle.
2. label the points (1,2), (3,4), (5,6).
3. plot any random point on screen (oldpoint).
4. generate a random integer between 1 and 6 inclusive.
(like a simulated dice throw)
5. plot (newpoint) half way between (oldpoint) and the vertex with
the same label as the random integer.
6. oldpoint = newpoint.
7. repeat 4, 5, 6 until...?
The program should run in any enviornment that WINDOWS can handle. It
looks good on VGA/EGA. I don't know about CGA.
Many thanks to Charles Petzold. The program source code is structured
similar to his RANDRECT program in the PROGRAMMING WINDOWS book.
Send comments ect to Marty Belles 72735,661.
Have fun!